# encoding: utf-8
"""
@author: 夏洛
@QQ: 1972386194
@file: mt-rpc.py
"""

import requests
# url = 'https://api.waitwaitpay.com/api/voucher_suppliers'
import asyncio
# import websockets
# async def check_permit(websocket):
#     send_text = 'https://passport.meituan.com/account/unitivelogin?service=www&continue=http%3A%2F%2Fwww.meituan.com%2Faccount%2Fsettoken%3Fcontinue%3Dhttp%253A%252F%252Fchs.meituan.com%252Fmeishi%252F&risk_partner=126&risk_app=216&risk_platform=1'
#     await websocket.send(send_text)
#     return True
#
# async def recv_msg(websocket):
#     while 1:
#         recv_text = await websocket.recv()
#         print(recv_text)
# async def main_logic(websocket, path):
#     await check_permit(websocket)
#     await recv_msg(websocket)
#
# start_server = websockets.serve(main_logic, '127.0.0.1', 9998)
# asyncio.get_event_loop().run_until_complete(start_server)
# asyncio.get_event_loop().run_forever()


import requests
data = {"group": "rpc-demo",
        "action": "mt",
        'url':'https://passport.meituan.com/account/unitivelogin?service=www&continue=http%3A%2F%2Fwww.meituan.com%2Faccount%2Fsettoken%3Fcontinue%3Dhttp%253A%252F%252Fchs.meituan.com%252Fmeishi%252F&risk_partner=126&risk_app=216&risk_platform=1',
        'xialuo':'你好啊'
        }
res = requests.get("http://127.0.0.1:5620/business-demo/invoke",params=data )
print(res.text)
